<!-- 正文开始 -->
<style>
    :root {
        --color1: #009C5E;
        --color2: #FFB94D;
    }

    .layui-body-header + div {
        position: absolute;
        left: 0;
        right: 0;
        top: 20px;
        bottom: 0;
        overflow: auto;
    }

    .layui-fluid {
        padding: 0 20px 0;
        overflow-y: auto;
    }

    /*导航栏*/
    .reportNav {
        width: 100%;
        height: 61px;
        background: #FFFFFF;
        border-radius: 5px 5px 5px 5px;
        box-sizing: border-box;
        overflow: hidden;
    }

    .reportNavBox {
        width: 100%;
        height: 55px;
        padding: 0 20px;
    }

    .reportNavBox > li {
        float: left;
        padding: 20px 14px 14px;
        font-size: 16px;
        font-weight: 400;
        color: #999999;
        margin-right: 62px;
        cursor: pointer;
        transition: all 300ms;
        position: relative;
    }

    .reportNavBox > li:hover {
        font-weight: bold;
        color: #333333;
    }

    .reportNavBox > li.active {
        font-weight: bold;
        color: #333333;
    }

    .reportNavBox > li.active:before {
        content: "";
        display: block;
        width: 100%;
        height: 6px;
        background: var(--color1);
        position: absolute;
        left: 0;
        bottom: -6px;
    }

    /*头部标题 时间选择*/
    .headerBox {
        display: flex;
        margin: 20px 0;
        box-sizing: border-box;
        justify-content: space-between;
        align-items: center;
    }

    .headerTitle {
        height: 26px;
        font-size: 20px;
        font-weight: bold;
        color: #333333;
        line-height: 23px;
        position: relative;
        padding: 0 16px;
    }

    .headerTitle:before {
        content: "";
        display: block;
        height: 100%;
        width: 6px;
        background: var(--color1);
        position: absolute;
        left: 0;
        top: 0;
    }

    .headerTime {
        display: flex;
    }

    .headerTime .timeSelect {
        width: 110px;
        height: 48px;
        background: #FFFFFF;
        border-radius: 5px 5px 5px 5px;
        box-sizing: border-box;
        padding: 5px 10px;
        border: 1px solid #EDEFF4;
        margin-right: 10px;
    }

    .timeSelect dl {
        width: 80px;
        left: -10px;
    }

    .headerTime .timeFreedom {
        box-sizing: border-box;
        width: 270px;
        height: 48px;
        background: #FFFFFF;
        border-radius: 5px 5px 5px 5px;
        border: 1px solid #EDEFF4;
        padding: 5px 10px;
        line-height: 38px;
        display: flex;
    }

    .timeFreedom input, .headerTime .timeSelect input {
        border-width: 0;
        font-size: 16px;
        font-weight: 400;
        color: #333333;
        line-height: 19px;
    }

    .timeFreedom .layui-icon {
        font-size: 30px;
    }

    .timeFreedom input {
        width: calc(100% - 30px);
        display: inline-block;
    }

    .timeFreedom input::placeholder {
        font-size: 16px;
    }

    /*头部数据统计样式*/
    .statBox > div {
        display: none;
        transition: all 300ms;
    }

    .statBox > div.active {
        display: flex;
    }

    .statBoxItem {
        display: flex;
        justify-content: space-between;
    }

    .statBoxItem > .statBoxItemList {
        box-sizing: border-box;
        padding: 28px 20px;
        height: 132px;
        background: #FFFFFF;
        border-radius: 5px 5px 5px 5px;
        display: flex;
        cursor: pointer;
        flex: 1;
        margin-right: 20px;
        transition: all 1000ms;
    }

    .statBoxItem > .statBoxItemList:hover {
        box-shadow: rgba(0, 0, 0, 0.2) 0 0px 8px;
    }

    .statBoxItem > .statBoxItemList:last-child {
        margin-right: 0;
    }

    .statBoxItemList > .statBoxItemListContent {
        flex: 1;
    }

    .statBoxItemListImg {
        width: 70px;
        height: 70px;
        margin-top: 3px;
    }

    .statBoxItemListContent .statBoxItemListName {
        font-size: 12px;
        font-weight: 400;
        color: #999999;
        line-height: 14px;
        margin-bottom: 10px;
    }

    .statBoxItemListContent .statBoxItemListNum {
        font-size: 24px;
        font-weight: bold;
        color: #333333;
        line-height: 42px;
    }

    /* 报表内容区域*/
    .reportMain {
        width: 100%;
        margin-top: 20px;
    }

    .reportNape {
        margin-bottom: 20px;
        display: flex;
        justify-content: space-between;
    }

    .reportList {
        background: #FFFFFF;
        box-sizing: border-box;
        padding: 14px 20px;
        border-radius: 10px;
        transition: all 1000ms;
    }

    .reportList:hover {
        box-shadow: rgba(0, 0, 0, 0.2) 0 0 8px;
    }

    .reportListHeader {
        display: flex;
        justify-content: space-between;
        margin-bottom: 20px;
    }

    .reportListHeader .reportListHeaderTitle {
        height: 26px;
        font-size: 20px;
        font-weight: bold;
        color: #333333;
        line-height: 23px;
        margin: 6px 0;
    }

    .reportListHeaderRight {
        display: flex;
        align-items: center;
    }

    .reportListHeaderRight .reportListHeaderMore {
        height: 19px;
        font-size: 16px;
        font-weight: 400;
        color: #666666;
        line-height: 19px;
        cursor: pointer;
    }

    .reportListHeaderRight .reportListHeaderSelect {
        margin-right: 10px;
        width: 110px;
        box-sizing: border-box;
    }

    /*样式1*/
    .reportView1 {
        width: 100%;
    }

    .reportView1Header {
        display: flex;
        margin-bottom: 20px;
    }

    .reportView1Header > div {
        font-size: 16px;
        font-weight: bold;
        color: #666666;
        line-height: 19px;
        overflow: hidden;
    }

    .reportView1Header .reportView1HeaderOrder {
        width: 44px;
        height: 21px;
        margin-right: 30px;
    }

    .reportView1Header .reportView1HeaderCode {
        width: 19%;
        margin-right: 10px;
        overflow: hidden;
    }

    .reportView1Header .reportView1HeaderTwig {
        flex: 1;
    }

    .reportView1Header .reportView1HeaderRatio {
        width: 65px;
        overflow: hidden;
    }

    .reportView1Header .reportView1HeaderQuantity {
        text-align: right;
        width: 19%;
        overflow: hidden;
        margin-right: 12px;

    }

    .reportView1Main {
        height: 305px;
        overflow-y: auto;
    }

    .reportView1Box {
        overflow-y: scroll;
    }

    .reportView1Main::-webkit-scrollbar,
    .reportView2Main::-webkit-scrollbar {
        width: 3px;
    }

    .reportView1List {
        display: flex;
        margin-bottom: 20px;
        align-items: center;
    }

    .reportView1List > div {
        overflow: hidden;
    }

    .reportView1List .reportView1ListOrder {
        width: 44px;
        height: 44px;
        background: #F3F4F5;
        border-radius: 2px 2px 2px 2px;
        font-size: 16px;
        font-weight: bold;
        color: #000000;
        text-align: center;
        line-height: 44px;
        margin-right: 30px;
    }

    .reportView1List .reportView1ListCode {
        width: 19%;
        overflow: hidden;
        margin-right: 10px;
        font-size: 16px;
        font-weight: 400;
        color: #333333;
        line-height: 44px;
        height: 44px;
    }

    .reportView1List .reportView1ListTwig {
        margin: 0 15px 0 5px;
        flex: 1;
        height: 8px;
        background: #EDEFF2;
        border-radius: 100px 100px 100px 100px;
    }

    .reportView1ListTwig > p {
        height: 100%;
        background-color: var(--color2);
        border-radius: 100px 100px 100px 100px;
    }

    .reportView1List .reportView1ListRatio {
        width: 65px;
        line-height: 44px;
        height: 44px;
        font-size: 16px;
        font-weight: bold;
        color: #333333;
    }

    .reportView1List .reportView1ListQuantity {
        text-align: right;
        width: 19%;
        overflow: hidden;
        line-height: 44px;
        height: 44px;
        font-size: 16px;
        font-weight: bold;
        color: #333333;
    }

    /*样式2*/
    .reportView2 {
        width: 100%;
    }

    .reportView2 .reportView2Header {
        display: flex;
        height: 52px;
        background: #F2F4F8;
        line-height: 52px;
        font-size: 14px;
        font-weight: bold;
        color: #333333;
    }

    .reportView2HeaderRanking {
        width: 19%;
        box-sizing: border-box;
        text-align: center;
    }

    .reportView2HeaderCode {
        flex: 1;
        box-sizing: border-box;
    }

    .reportView2HeaderRatio,
    .reportView2HeaderQuantity {
        width: 19%;
        text-align: center;
    }

    .reportView2Main {
        height: 285px;
        overflow-y: auto;
        font-size: 14px;
        font-weight: 400;
        color: #333333;
        padding-top: 10px;
    }

    .reportView2List {
        display: flex;
        box-sizing: border-box;
        height: 38px;
        align-items: center;
        margin-bottom: 20px
    }

    .reportView2ListRanking {
        width: 19%;
        box-sizing: border-box;
        text-align: center;
        display: flex;
        height: 100%;
        align-items: center;
        justify-content: center;
    }

    .reportView2ListRanking > span {
        width: 26px;
        height: 26px;
        border-radius: 50%;
        background: #F1F2F6;
        line-height: 26px;
        text-align: center;
    }

    .reportView2List:nth-child(1) .reportView2ListRanking > span,
    .reportView2List:nth-child(2) .reportView2ListRanking > span,
    .reportView2List:nth-child(3) .reportView2ListRanking > span {
        background-color: transparent;
        width: 28px;
        height: 38px;
        border-radius: 0;
    }

    .reportView2List:nth-child(1) .reportView2ListRanking > span {
        background-image: url('assets/images/weighCabinetReport/num1.png');
    }

    .reportView2List:nth-child(2) .reportView2ListRanking > span {
        background-image: url('assets/images/weighCabinetReport/num2.png');
    }

    .reportView2List:nth-child(3) .reportView2ListRanking > span {
        background-image: url('assets/images/weighCabinetReport/num3.png');
    }

    .reportView2ListCode {
        flex: 1;
        box-sizing: border-box;
    }

    .reportView2ListRatio,
    .reportView2ListQuantity {
        width: 19%;
        text-align: center;
    }

    .reportView2ListQuantity {
        font-size: 14px;
        font-weight: bold;
        color: #333333;
    }

    /*样式3  样式4  样式5 样式6 样式7*/
    .reportView3,
    .reportView4,
    .reportView5,
    .reportView6,
    .reportView7 {
        width: 100%;
        height: calc(100% - 66px);
    }

    .reportView3 .reportView3Box,
    .reportView4 .reportView4Box,
    .reportView5 .reportView5Box,
    .reportView6 .reportView6Box,
    .reportView7 .reportView7Box {
        width: 100%;
        height: 100%;
    }

    /*  表格  */
    .tableBox {
        width: 100%;
        padding: 20px;
        background: #FFFFFF;
        box-sizing: border-box;
        border-radius: 10px;
    }

    .tableBox > .tableBoxList,
    .reportMain > div {
        display: none;
    }

    .tableBox > .active,
    .reportMain > .active {
        display: block;
    }

    .tableBoxList .tableBoxHeader {
        height: 26px;
        font-size: 20px;
        font-weight: bold;
        color: #333333;
        display: flex;
        justify-content: space-between;
    }

    .weighCabinetReportTableMore {
        font-size: 16px;
        color: #666;
        padding-left: 10px;
    }
</style>
<div class="layui-fluid">
    <div class="reportBody">
        <!-- 头部导航 -->
        <div class="reportNav">
            <ul class="reportNavBox layui-clear">
                <li class="active">上货</li>
                <li>领新</li>
                <li>退料</li>
                <li>报修</li>
                <li>报废</li>
            </ul>
        </div>

        <!-- 头部标题 时间选择 -->
        <div class="headerBox">
            <div class="headerTitle">物料数据统计</div>
            <div class="headerTime layui-form">
                <div class="timeSelect">
                    <select name="type" lay-filter="timeType">
                        <option value="">请选择</option>
                        <option value="1">日</option>
                        <option value="2">周</option>
                        <option value="3" selected>月</option>
                    </select>
                </div>
                <div class="timeFreedom">
                    <i class="layui-icon layui-icon-date"></i>
                    <input type="text" class="layui-input" readonly="true" id="time1" placeholder="请选择起止时间">
                </div>
            </div>
        </div>

        <!--  头部数据统计  -->
        <div class="statBox">
            <!--上货统计-->
            <div class="statBoxItem active" id="statBoxItem">
                <div class="statBoxItemList">
                    <div class="statBoxItemListContent">
                        <p class="statBoxItemListName">上货重量（kg）</p>
                        <p class="statBoxItemListNum">100</p>
                    </div>
                    <div class="statBoxItemListImg"><img src="assets/images/weighCabinetReport/zlg_sh1.png" alt="">
                    </div>
                </div>
                <div class="statBoxItemList">
                    <div class="statBoxItemListContent">
                        <p class="statBoxItemListName">上货数量</p>
                        <p class="statBoxItemListNum">100</p>
                    </div>
                    <div class="statBoxItemListImg"><img src="assets/images/weighCabinetReport/zlg_sh2.png" alt="">
                    </div>
                </div>
                <div class="statBoxItemList">
                    <div class="statBoxItemListContent">
                        <p class="statBoxItemListName">上货金额（元）</p>
                        <p class="statBoxItemListNum">100</p>
                    </div>
                    <div class="statBoxItemListImg"><img src="assets/images/weighCabinetReport/zlg_sh3.png" alt="">
                    </div>
                </div>
                <div class="statBoxItemList">
                    <div class="statBoxItemListContent">
                        <p class="statBoxItemListName">补货重量（kg）</p>
                        <p class="statBoxItemListNum">100</p>
                    </div>
                    <div class="statBoxItemListImg"><img src="assets/images/weighCabinetReport/zlg_sh4.png" alt="">
                    </div>
                </div>
                <div class="statBoxItemList">
                    <div class="statBoxItemListContent">
                        <p class="statBoxItemListName">补货数量</p>
                        <p class="statBoxItemListNum">100</p>
                    </div>
                    <div class="statBoxItemListImg"><img src="assets/images/weighCabinetReport/zlg_sh5.png" alt="">
                    </div>
                </div>
                <div class="statBoxItemList">
                    <div class="statBoxItemListContent">
                        <p class="statBoxItemListName">补货金额（元）</p>
                        <p class="statBoxItemListNum">100</p>
                    </div>
                    <div class="statBoxItemListImg"><img src="assets/images/weighCabinetReport/zlg_sh6.png" alt="">
                    </div>
                </div>
            </div>
        </div>

        <!-- 报表-->
        <div class="reportMain  layui-form" id="weighCabinetReport">
            <!-- 上货 -->
            <div class="reportBox active">
                <div class="reportNape" id="cargo">
                    <div id="cargo1" class="reportList" style="width: 797px;height: 429px;">
                        <div class="reportListHeader">
                            <div class="reportListHeaderTitle">上货物料排名123</div>
                            <div class="reportListHeaderRight">
                                <div class="reportListHeaderMore">更多<i class="layui-icon layui-icon-right"></i></div>
                            </div>
                        </div>
                        <div class="reportView1">
                            <div class="reportView1Header">
                                <div class="reportView1HeaderOrder">序号</div>
                                <div class="reportView1HeaderCode">物料编号</div>
                                <div class="reportView1HeaderTwig"></div>
                                <div class="reportView1HeaderRatio">占比</div>
                                <div class="reportView1HeaderQuantity">数值</div>
                            </div>
                            <div class="reportView1Main">
                                <div class="reportView1Box"></div>
                            </div>
                        </div>
                    </div>
                    <div id="cargo2" class="reportList" style="width: 797px;height: 429px;">
                        <div class="reportListHeader">
                            <div class="reportListHeaderTitle">补货物料排名</div>
                            <div class="reportListHeaderRight">
                                <div class="reportListHeaderMore">更多<i class="layui-icon layui-icon-right"></i></div>
                            </div>
                        </div>
                        <div class="reportView2">
                            <div class="reportView2Header">
                                <div class="reportView2HeaderRanking">排名</div>
                                <div class="reportView2HeaderCode">物料编号</div>
                                <div class="reportView2HeaderRatio">占比</div>
                                <div class="reportView2HeaderQuantity">数量</div>
                            </div>
                            <div class="reportView2Main">
                                <div class="reportView2Box">
                                    <!--<div class="reportView2List">
                                        <div class="reportView2ListRanking"><span>4</span></div>
                                        <div class="reportView2ListCode">sku-001-fld-003-data-2023</div>
                                        <div class="reportView2ListRatio">60.00%</div>
                                        <div class="reportView2ListQuantity">12345</div>
                                    </div>-->
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 领新-->
            <div class="reportBox">
                <div class="reportNape">
                    <div id="linXin1" class="reportList" style="width: 960px;height: 425px;">
                        <div class="reportListHeader">
                            <div class="reportListHeaderTitle">物料消耗量（物料）</div>
                            <div class="reportListHeaderRight">
                                <div class="reportListHeaderSelect">
                                    <select name="other" lay-filter="other">
                                        <option value="oldSpec">按规格</option>
                                        <option value="category">按分类</option>
                                    </select>
                                </div>
                                <div class="reportListHeaderSelect">
                                    <select name="param" lay-filter="param">
                                        <option value="qua">数量</option>
                                        <option value="money">金额</option>
                                    </select>
                                </div>
                                <div class="reportListHeaderMore">更多<i class="layui-icon layui-icon-right"></i></div>
                            </div>
                        </div>
                        <div class="reportView3">
                            <div class="reportView3Box"></div>
                        </div>
                    </div>
                    <div id="linXin2" class="reportList" style="width: 635px;height: 425px;">
                        <div class="reportListHeader">
                            <div class="reportListHeaderTitle">物料类型</div>
                            <div class="reportListHeaderRight">
                                <div class="reportListHeaderSelect">
                                    <select name="param">
                                        <option value="qua">数量</option>
                                        <option value="money">金额</option>
                                    </select>
                                </div>
                                <div class="reportListHeaderMore">更多<i class="layui-icon layui-icon-right"></i></div>
                            </div>
                        </div>
                        <div class="reportView4">
                            <div class="reportView4Box"></div>
                        </div>
                    </div>
                </div>
                <div class="reportNape">
                    <div id="linXin3" class="reportList" style="width: 960px;height: 425px;">
                        <div class="reportListHeader">
                            <div class="reportListHeaderTitle">员工领用统计</div>
                            <div class="reportListHeaderRight">
                                <div class="reportListHeaderSelect">
                                    <select name="other" lay-filter="other">
                                        <option value="user">按人员</option>
                                        <option value="dept">按部门</option>
                                    </select>
                                </div>
                                <div class="reportListHeaderSelect">
                                    <select name="param" lay-filter="param">
                                        <option value="qua">数量</option>
                                        <option value="money">金额</option>
                                    </select>
                                </div>
                                <div class="reportListHeaderMore">更多<i class="layui-icon layui-icon-right"></i></div>
                            </div>
                        </div>
                        <div class="reportView1">
                            <div class="reportView1Header">
                                <div class="reportView1HeaderOrder">序号</div>
                                <div class="reportView1HeaderCode">名称</div>
                                <div class="reportView1HeaderTwig"></div>
                                <div class="reportView1HeaderRatio">占比</div>
                                <div class="reportView1HeaderQuantity">数量</div>
                            </div>
                            <div class="reportView1Main">
                                <div class="reportView1Box">
                                    <div class="reportView1List">
                                        <div class="reportView1ListOrder">1</div>
                                        <div class="reportView1ListCode">sku-001-fld-003-data-2023</div>
                                        <div class="reportView1ListTwig"><p
                                                style="background-color: var(--color1);width: 60%;"></p></div>
                                        <div class="reportView1ListRatio">60.00%</div>
                                        <div class="reportView1ListQuantity">12345支</div>
                                    </div>
                                    <div class="reportView1List">
                                        <div class="reportView1ListOrder">2</div>
                                        <div class="reportView1ListCode">sku-002-fld-003-data-2023</div>
                                        <div class="reportView1ListTwig"><p style="width: 50%;"></p></div>
                                        <div class="reportView1ListRatio">50.00%</div>
                                        <div class="reportView1ListQuantity">12345支</div>
                                    </div>
                                    <div class="reportView1List">
                                        <div class="reportView1ListOrder">2</div>
                                        <div class="reportView1ListCode">sku-002-fld-003-data-2023</div>
                                        <div class="reportView1ListTwig"><p style="width: 50%;"></p></div>
                                        <div class="reportView1ListRatio">50.00%</div>
                                        <div class="reportView1ListQuantity">12345支</div>
                                    </div>
                                    <div class="reportView1List">
                                        <div class="reportView1ListOrder">2</div>
                                        <div class="reportView1ListCode">sku-002-fld-003-data-2023</div>
                                        <div class="reportView1ListTwig"><p style="width: 50%;"></p></div>
                                        <div class="reportView1ListRatio">50.00%</div>
                                        <div class="reportView1ListQuantity">12345支</div>
                                    </div>
                                    <div class="reportView1List">
                                        <div class="reportView1ListOrder">2</div>
                                        <div class="reportView1ListCode">sku-002-fld-003-data-2023</div>
                                        <div class="reportView1ListTwig"><p style="width: 50%;"></p></div>
                                        <div class="reportView1ListRatio">50.00%</div>
                                        <div class="reportView1ListQuantity">12345支</div>
                                    </div>
                                    <div class="reportView1List">
                                        <div class="reportView1ListOrder">2</div>
                                        <div class="reportView1ListCode">sku-002-fld-003-data-2023</div>
                                        <div class="reportView1ListTwig"><p style="width: 50%;"></p></div>
                                        <div class="reportView1ListRatio">50.00%</div>
                                        <div class="reportView1ListQuantity">12345支</div>
                                    </div>
                                    <div class="reportView1List">
                                        <div class="reportView1ListOrder">2</div>
                                        <div class="reportView1ListCode">sku-002-fld-003-data-2023</div>
                                        <div class="reportView1ListTwig"><p style="width: 50%;"></p></div>
                                        <div class="reportView1ListRatio">50.00%</div>
                                        <div class="reportView1ListQuantity">12345支</div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div id="linXin4" class="reportList" style="width: 635px;height: 425px;">
                        <div class="reportListHeader">
                            <div class="reportListHeaderTitle">物料消耗品牌</div>
                            <div class="reportListHeaderRight">
                                <div class="reportListHeaderSelect">
                                    <select name="param" lay-filter="param">
                                        <option value="qua">数量</option>
                                        <option value="money">金额</option>
                                    </select>
                                </div>
                                <div class="reportListHeaderMore">更多<i class="layui-icon layui-icon-right"></i></div>
                            </div>
                        </div>
                        <div class="reportView5">
                            <div class="reportView5Box"></div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 退料-->
            <div class="reportBox">
                <div class="reportNape">
                    <div id="returnMaterial1" class="reportList" style="width: 797px;height: 429px;">
                        <div class="reportListHeader">
                            <div class="reportListHeaderTitle">退料物料占比（按物料）</div>
                            <div class="reportListHeaderRight">
                                <div class="reportListHeaderSelect">
                                    <select name="other" lay-filter="other">
                                        <option value="oldSpec">按规格</option>
                                        <option value="category">按分类</option>
                                    </select>
                                </div>
                                <div class="reportListHeaderMore">更多<i class="layui-icon layui-icon-right"></i></div>
                            </div>
                        </div>
                        <div class="reportView6">
                            <div class="reportView6Box"></div>
                        </div>
                    </div>
                    <div id="returnMaterial2" class="reportList" style="width: 797px;height: 429px;">
                        <div class="reportListHeader">
                            <div class="reportListHeaderTitle">退料物料排名（按人员）</div>
                            <div class="reportListHeaderRight">
                                <div class="reportListHeaderMore">更多<i class="layui-icon layui-icon-right"></i></div>
                            </div>
                        </div>
                        <div class="reportView5">
                            <div class="reportView5Box"></div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 报修-->
            <div class="reportBox">
                <div class="reportNape">
                    <div id="repair1" class="reportList" style="width: 525px;height: 429px;">
                        <div class="reportListHeader">
                            <div class="reportListHeaderTitle">物料消耗排名（按物料）</div>
                            <div class="reportListHeaderRight">
                                <div class="reportListHeaderMore">更多<i class="layui-icon layui-icon-right"></i></div>
                            </div>
                        </div>
                        <div class="reportView2">
                            <div class="reportView2Header">
                                <div class="reportView2HeaderRanking">排名</div>
                                <div class="reportView2HeaderCode">物料编号</div>
                                <div class="reportView2HeaderRatio">占比</div>
                                <div class="reportView2HeaderQuantity">数值</div>
                            </div>
                            <div class="reportView2Main">
                                <div class="reportView2Box">

                                </div>
                            </div>
                        </div>
                    </div>
                    <div id="repair2" class="reportList" style="width: 525px;height: 429px;">
                        <div class="reportListHeader">
                            <div class="reportListHeaderTitle">物料消耗排名（按人员）</div>
                            <div class="reportListHeaderRight">
                                <div class="reportListHeaderMore">更多<i class="layui-icon layui-icon-right"></i></div>
                            </div>
                        </div>
                        <div class="reportView5">
                            <div class="reportView5Box"></div>
                        </div>
                    </div>
                    <div id="repair3" class="reportList" style="width: 525px;height: 429px;">
                        <div class="reportListHeader">
                            <div class="reportListHeaderTitle">物料消耗排名（按类型）</div>
                            <div class="reportListHeaderRight">
                                <div class="reportListHeaderMore">更多<i class="layui-icon layui-icon-right"></i></div>
                            </div>
                        </div>
                        <div class="reportView7">
                            <div class="reportView7Box"></div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 报废-->
            <div class="reportBox">
                <div class="reportNape">
                    <div id="scrap1" class="reportList" style="width: 525px;height: 429px;">
                        <div class="reportListHeader">
                            <div class="reportListHeaderTitle">物料消耗排名（按物料）</div>
                            <div class="reportListHeaderRight">
                                <div class="reportListHeaderMore">更多<i class="layui-icon layui-icon-right"></i></div>
                            </div>
                        </div>
                        <div class="reportView2">
                            <div class="reportView2Header">
                                <div class="reportView2HeaderRanking">排名</div>
                                <div class="reportView2HeaderCode">物料编号</div>
                                <div class="reportView2HeaderRatio">占比</div>
                                <div class="reportView2HeaderQuantity">数值</div>
                            </div>
                            <div class="reportView2Main">
                                <div class="reportView2Box">

                                </div>
                            </div>
                        </div>
                    </div>
                    <div id="scrap2" class="reportList" style="width: 525px;height: 429px;">
                        <div class="reportListHeader">
                            <div class="reportListHeaderTitle">物料消耗排名（按人员）</div>
                            <div class="reportListHeaderRight">
                                <div class="reportListHeaderMore">更多<i class="layui-icon layui-icon-right"></i></div>
                            </div>
                        </div>
                        <div class="reportView5">
                            <div class="reportView5Box"></div>
                        </div>
                    </div>
                    <div id="scrap3" class="reportList" style="width: 525px;height: 429px;">
                        <div class="reportListHeader">
                            <div class="reportListHeaderTitle">物料消耗排名（按类型）</div>
                            <div class="reportListHeaderRight">
                                <div class="reportListHeaderMore">更多<i class="layui-icon layui-icon-right"></i></div>
                            </div>
                        </div>
                        <div class="reportView7">
                            <div class="reportView7Box"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- 表格 -->
        <div class="tableBox">
            <!-- 上货 -->
            <div class="tableBoxList active">
                <div class="tableBoxHeader">
                    <div id="weighCabinetReportTableTitle">物料上货补货记录列表</div>
                    <a id="weighCabinetReportTableMore" class="weighCabinetReportTableMore"
                       href="#/wcabinet/wcabCellLoad">
                        更多
                        <i class="layui-icon layui-icon-right"></i>
                    </a>
                </div>
                <table class="layui-table" id="weighCabinetReportTable" lay-filter="weighCabinetReportTable"></table>
            </div>
        </div>
    </div>
</div>


<!--monthlyStatisticsForm-->
<!--统计弹窗-->
<script type="text/html" id="monthlyStatisticsForm">
    <form lay-filter="monthlyStatisticsForm" class="layui-form model-form"
          style="padding: 5px 30px 0 30px;height: calc(100% - 5px);overflow: hidden;">
        <div class="open-details-box" style="height: calc(100% - 75px);">
            <div class="layui-row table-bor">
                <button type="button" class="layui-btn" id="monthlyStatisticsFormExport">导出数据</button>
                <table class="layui-table" id="monthlyStatisticsFormTable"
                       lay-filter="monthlyStatisticsFormTable"></table>
            </div>
        </div>
        <div class="layui-form-item text-right">
            <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button>
        </div>
    </form>
</script>


<!--allDataChart -->
<!--数据图表弹窗-->
<script type="text/html" id="allDataChart">
    <form lay-filter="allDataChartForm" class="layui-form model-form"
          style="padding: 5px 30px 0 30px;height: calc(100% - 5px);overflow: hidden;">
        <div class="open-details-box" style="height: calc(100% - 75px); overflow-y: scroll">
            <button type="button" class="layui-btn" id="allDataChartFormExport" style="margin: 20px 0">导出数据</button>
            <div class="layui-row table-bor" style="height:calc(100% - 80px)" id="allDataChartFormchartDom"></div>
            <div style="display: none" id="allDataChartTableBox">
                <table class="layui-table" id="allDataChartTable" lay-filter="allDataChartTable"
                       style="display: none"></table>
            </div>
        </div>

        <div class="layui-form-item text-right">
            <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button>
        </div>
    </form>
</script>


<!-- js部分 -->
<script src="/admin/assets/libs/echarts/echarts.min.js"></script>
<script src="/admin/assets/libs/echarts/echartsTheme.js"></script>

<script>
    layui.use(['layer', 'element', 'config', 'admin', 'form', 'table', 'laydate'], function () {
        var $ = layui.jquery;
        var layer = layui.layer;
        var element = layui.element;
        var config = layui.config;
        var table = layui.table;
        var admin = layui.admin;
        var form = layui.form;
        let laydate = layui.laydate;

        form.render('select');

        // 所有配置信息
        let configData = {
            "上货": {
                id: 'cargo',
                name: "上货", //名字
                navIcon: "sh", // 物料数据统计图标
                navStyle: 1, // 物料数据统计样式
                headerObj: {type: 3, startTime: "", endTime: "", click: 0, table: 1}, // 物料数据统计请求参数
                reportObj: {type: 3, startTime: "", endTime: ""}, // 内容公共请求参数
                reportSubObj: [// 内容对应请求参数
                    {// url：请求地址,   id:盒子id,  data:保存请求的数据, style: 风格样式,title标题
                        url: "enterprisecab/bill/admin/weighCabinetReport/exhibitRanking",
                        id: "cargo1",
                        data: [],
                        title: "",
                        style: 1, // 必须是number类型
                    },
                    {
                        url: "enterprisecab/bill/admin/weighCabinetReport/replenishment",
                        id: "cargo2",
                        title: "",
                        data: [],
                        style: 2
                    },
                ],
                tableTitle: "物料上货补货记录列表",
                tableObj: {
                    url: 'enterprisecab/bill/admin/weighCabinetReport/exhibitRecordList',
                    moreUrl: '#/wcabinet/wcabCellLoad',
                    cols: [
                        {type: 'numbers', title: '序号'}
                        , {field: 'code', title: '上/补货单号', width: '150'}
                        , {field: 'cabCode', title: '柜子编号', width: '150'}
                        , {field: 'spaceCode', title: '货道编号'}
                        , {field: 'skuCode', sort: true, title: '物料编号'}
                        , {field: 'oldSpecCode', title: '物料规格'}
                        , {field: 'weight', title: '上货重量', templet: d => d.weight + "(" + d.weightUnitDesc + ")"}
                        , {field: 'marketPrice', title: '单价'}
                        , {field: 'creatorName', sort: true, title: '上货人'}
                        , {field: 'createTime', sort: true, title: '上货时间', width: '150'}
                    ]
                }
            },
            "领新": {
                id: 'linXin',
                name: "领新",
                navIcon: "lx",
                navStyle: 1,
                headerObj: {type: 3, startTime: "", endTime: "", click: 0, table: 2},
                reportObj: {type: 3, startTime: "", endTime: ""},
                reportSubObj: [// 内容对应请求参数
                    {
                        url: "enterprisecab/bill/admin/weighCabinetReport/findMaterialConsumption",
                        id: "linXin1",
                        data: [],
                        title: "",
                        style: 3, // 必须是number类型
                        selectParam: {
                            other: 'oldSpec',
                            param: 'qua'
                        }
                    },
                    {
                        url: "enterprisecab/bill/admin/weighCabinetReport/findMaterialByType",
                        id: "linXin2",
                        title: "",
                        data: [],
                        style: 4,
                        selectParam: {
                            param: 'qua'
                        }
                    },
                    {
                        url: "enterprisecab/bill/admin/weighCabinetReport/findRequisitionStatistics",
                        id: "linXin3",
                        title: "",
                        data: [],
                        style: 1,
                        selectParam: {
                            other: 'user',
                            param: 'qua'
                        }
                    },
                    {
                        url: "enterprisecab/bill/admin/weighCabinetReport/findMaterialConsumeByBrand",
                        id: "linXin4",
                        title: "",
                        data: [],
                        style: 5,
                        selectParam: {
                            param: 'qua'
                        }
                    },
                ],
                tableTitle: "物料领新记录列表",
                tableObj: {
                    url: 'enterprisecab/bill/admin/weighCabinetReport/queryReceiverRecordList',
                    moreUrl: '#/wcabinet/wcabCellInventoryOut',
                    cols: [
                        {type: 'numbers', title: '序号'}
                        , {field: 'code', title: '领用记录编号', width: '150'}
                        , {field: 'cabCode', title: '柜子编号', width: '150'}
                        , {field: 'productName', sort: true, title: '物料名称'}
                        , {field: 'skuCode', sort: true, title: '物料编号'}
                        , {field: 'oldSpecCode', sort: true, title: '物料规格'}
                        , {field: 'weight', title: '重量', templet: d => d.weight + "(" + d.weightUnitDesc + ")"}
                        , {field: 'quantity', title: '数量'}
                        , {field: 'marketPrice', title: '单价'}
                        , {field: 'creatorName', sort: true, title: '领取人'}
                        , {field: 'createTime', sort: true, title: '领取时间', width: '150'}
                    ]
                }

            },
            "退料": {
                id: 'returnMaterial',
                name: "退料",
                navIcon: "tl",
                navStyle: 1,
                headerObj: {type: 3, startTime: "", endTime: "", click: 0, table: 3},
                reportObj: {type: 3, startTime: "", endTime: ""},
                reportSubObj: [// 内容对应请求参数
                    {
                        url: "enterprisecab/bill/admin/weighCabinetReport/findProportionOfReturned",
                        id: "returnMaterial1",
                        data: [],
                        title: "",
                        style: 6, // 必须是number类型
                        selectParam: {
                            other: 'oldSpec',
                        }
                    },
                    {
                        url: "enterprisecab/bill/admin/weighCabinetReport/findReturnedMaterialRanking",
                        id: "returnMaterial2",
                        title: "",
                        data: [],
                        style: 5
                    }
                ],
                tableTitle: "退料记录列表",
                tableObj: {
                    url: 'enterprisecab/bill/admin/weighCabinetReport/queryReturnedRecordList',
                    moreUrl: '#/wcabinet/wcabCellInventoryReturnIn',
                    cols: [
                        {type: 'numbers', title: '序号'}
                        , {field: 'code', title: '退货记录编号', width: '150'}
                        , {field: 'cabCode', title: '柜子编号', width: '150'}
                        , {field: 'spaceCode', title: '货位编号'}
                        , {field: 'productName', sort: true, title: '物料名称'}
                        , {field: 'skuCode', sort: true, title: '物料编号'}
                        , {field: 'oldSpecCode', sort: true, title: '物料规格'}
                        , {field: 'weight', title: '重量', templet: d => d.weight + "(" + d.weightUnitDesc + ")"}
                        , {field: 'quantity', title: '数量'}
                        , {field: 'marketPrice', title: '单价'}
                        , {field: 'creatorName', sort: true, title: '领取人'}
                        , {field: 'createTime', sort: true, title: '领取时间', width: '150'}
                    ]
                }
            },
            "报修": {
                id: 'repair',
                name: "报修",
                navIcon: "bx",
                navStyle: 1,
                headerObj: {type: 3, startTime: "", endTime: "", click: 0, table: 4},
                reportObj: {type: 3, startTime: "", endTime: ""},
                reportSubObj: [// 内容对应请求参数
                    {
                        url: "enterprisecab/bill/admin/weighCabinetReport/findRepairMaterialBySkuCode?businessType=2", // businessType=2 报修   businessType=3报废
                        id: "repair1",
                        data: [],
                        title: "",
                        style: 2, // 必须是number类型
                    },
                    {
                        url: "enterprisecab/bill/admin/weighCabinetReport/findRepairMaterialByUser?businessType=2",
                        id: "repair2",
                        title: "",
                        data: [],
                        style: 5
                    },
                    {
                        url: "enterprisecab/bill/admin/weighCabinetReport/findRepairMaterialByProductType?businessType=2",
                        id: "repair3",
                        title: "",
                        data: [],
                        style: 7
                    }
                ],
                tableTitle: "报修存入记录列表",
                tableObj: {
                    url: 'enterprisecab/bill/admin/weighCabinetReport/findRepairRecordListList?businessType=2', //businessType=2 报修   businessType=3报废
                    moreUrl: '#/wcabinet/wcabCellInventoryRepairIn',
                    cols: [
                        {type: 'numbers', title: '序号'}
                        , {field: 'code', title: '报修存入记录编号', width: '150'}
                        , {field: 'cabCode', title: '柜子编号', width: '150'}
                        , {field: 'spaceCode', title: '货位编号'}
                        , {field: 'productName', sort: true, title: '物料名称'}
                        , {field: 'skuCode', sort: true, title: '物料编号'}
                        , {field: 'oldSpecCode', sort: true, title: '物料规格'}
                        , {field: 'weight', title: '重量', templet: d => d.weight + "(" + d.weightUnitDesc + ")"}
                        , {field: 'quantity', title: '数量'}
                        , {field: 'marketPrice', title: '单价'}
                        , {field: 'creatorName', sort: true, title: '领取人'}
                        , {field: 'createTime', sort: true, title: '领取时间', width: '150'}
                    ]
                }
            },
            "报废": {
                id: 'scrap',
                name: "报废",
                navIcon: "bf",
                navStyle: 1,
                headerObj: {type: 3, startTime: "", endTime: "", click: 0, table: 5},
                reportObj: {type: 3, startTime: "", endTime: ""},
                reportSubObj: [// 内容对应请求参数
                    {
                        url: "enterprisecab/bill/admin/weighCabinetReport/findRepairMaterialBySkuCode?businessType=3", //businessType=2 报修   businessType=3报废
                        id: "scrap1",
                        data: [],
                        title: "",
                        style: 2, // 必须是number类型
                    },
                    {
                        url: "enterprisecab/bill/admin/weighCabinetReport/findRepairMaterialByUser?businessType=3",
                        id: "scrap2",
                        title: "",
                        data: [],
                        style: 5
                    },
                    {
                        url: "enterprisecab/bill/admin/weighCabinetReport/findRepairMaterialByProductType?businessType=3",
                        id: "scrap3",
                        title: "",
                        data: [],
                        style: 7
                    }
                ],
                tableTitle: "报修存入记录列表",
                tableObj: {
                    url: 'enterprisecab/bill/admin/weighCabinetReport/findRepairRecordListList?businessType=3',
                    moreUrl: '#/wcabinet/wcabCellInventoryRecycleIn',
                    cols: [
                        {type: 'numbers', title: '序号'}
                        , {field: 'code', title: '报废存入记录', width: '150'}
                        , {field: 'cabCode', title: '柜子编号', width: '150'}
                        , {field: 'spaceCode', title: '货位编号'}
                        , {field: 'productName', sort: true, title: '物料名称'}
                        , {field: 'skuCode', sort: true, title: '物料编号'}
                        , {field: 'oldSpecCode', sort: true, title: '物料规格'}
                        , {field: 'weight', title: '重量', templet: d => d.weight + "(" + d.weightUnitDesc + ")"}
                        , {field: 'quantity', title: '数量'}
                        , {field: 'marketPrice', title: '单价'}
                        , {field: 'creatorName', sort: true, title: '领取人'}
                        , {field: 'createTime', sort: true, title: '领取时间', width: '150'}
                    ]
                }
            }
        };

        // 当前选项的配置信息
        let activeConfigData = configData["上货"];
        init();

        // 入口方法
        function init() {
            //请求头部默认数据
            getStatData(activeConfigData.headerObj);

            // 请求图表默认数据
            getReportData(activeConfigData.reportSubObj);

            // 请求table 默认数据
            showTable(activeConfigData);
        }

        // 导航栏点击事件
        $('.reportNavBox > li').click(function () {
            $(this).addClass('active').siblings().removeClass('active');

            $('.reportMain > div').eq($(this).index()).addClass('active').siblings().removeClass('active');

            activeConfigData = configData[$(this).text()];
            activeConfigData.headerObj.table = $(this).index() + 1;

            // 重置时间
            activeConfigData.reportObj.startTime = '';
            activeConfigData.reportObj.endTime = '';
            $('#time1').val('');
            activeConfigData.headerObj.type = 3;
            activeConfigData.reportObj.type = 3;
            $('select[lay-filter="timeType"]').val(activeConfigData.headerObj.type);
            form.render('select');

            init();

        });

        // 时间选择
        form.on('select(timeType)', function (data) {
            activeConfigData.headerObj.type = data.value;
            activeConfigData.reportObj.type = data.value;

            activeConfigData.headerObj.startTime = '';
            activeConfigData.headerObj.endTime = '';

            activeConfigData.reportObj.startTime = '';
            activeConfigData.reportObj.endTime = '';
            $('#time1').val('');
            init();
        });

        let time1 = laydate.render({
            elem: '#time1',
            type: 'date',
            range: "至",
            done: function (value, date, endDate) {
                if (value) {
                    let timeArray = value.split("至");
                    $('select[lay-filter="timeType"]').val('');
                    activeConfigData.headerObj.startTime = timeArray[0].trim() + " 00:00:00";
                    activeConfigData.headerObj.endTime = timeArray[1].trim() + " 23:59:59";
                    activeConfigData.reportObj.startTime = timeArray[0].trim() + " 00:00:00";
                    activeConfigData.reportObj.endTime = timeArray[1].trim() + " 23:59:59";

                    activeConfigData.headerObj.type = '';
                    activeConfigData.reportObj.type = '';

                } else {
                    activeConfigData.headerObj.startTime = '';
                    activeConfigData.headerObj.endTime = '';
                    activeConfigData.reportObj.startTime = '';
                    activeConfigData.reportObj.endTime = '';
                    $('select[lay-filter="timeType"]').val(3);
                    activeConfigData.headerObj.type = 3;
                    activeConfigData.reportObj.type = 3;
                }
                form.render('select');
                init();
            }
        });


        // 请求物料数据统计 数据
        function getStatData(obj) {
            admin.req('enterprisecab/bill/admin/weighCabinetReport/headResult', obj, res => {
                if (res.code === 200) {
                    showStatData(res.data)
                }
            }, 'GET');
        }

        //渲染物料数据统计
        function showStatData(data) {
            let html = '';
            if (!data || data.length == 0) {
                return false
            }
            data.forEach((item, index) => {
                html += `
                     <div class="statBoxItemList" sign="${item.sign}">
                        <div class="statBoxItemListContent">
                            <p class="statBoxItemListName">${item.title}</p>
                            <p class="statBoxItemListNum">${priceUnit(item.num)}</p>
                        </div>
                        <div class="statBoxItemListImg">
                            <img src="assets/images/weighCabinetReport/zlg_${activeConfigData.navIcon}${index + 1}.png">
                        </div>
                    </div>
                `
            });
            $('#statBoxItem').html(html)
        }

        // 请求图表数据
        function getReportData(dataList) {
            dataList.forEach((item, index) => {
                let obj = {};
                if (item.selectParam) {
                    obj = Object.assign({}, item.selectParam, activeConfigData.reportObj);
                } else {
                    obj = Object.assign({}, activeConfigData.reportObj);
                }
                admin.req(item.url, obj, res => {
                    if (res.code === 200) {
                        activeConfigData.reportSubObj[index].data = res.data.data.list;
                        activeConfigData.reportSubObj[index].title = res.data.data.title;
                        if (res.data.data.sum) {
                            activeConfigData.reportSubObj[index].sum = res.data.data.sum;
                        }
                        showReportData(activeConfigData.reportSubObj[index])
                    }
                }, 'GET');
            })
        }

        //渲染图表数据
        function showReportData(_data) {
            // 测试数据
            // let aa = [
            //     {"num": "10", "name": "SKU-01", "ratio": "1.00%"},
            //     {"num": "180", "name": "SKU-18", "ratio": "18.00%"},
            //     {"num": "30", "name": "SKU-03", "ratio": "3.00%"},
            //     {"num": "130", "name": "SKU-13", "ratio": "13.00%"},
            //     {"num": "90", "name": "SKU-09", "ratio": "9.00%"},
            //     {"num": "50", "name": "SKU-05", "ratio": "5.00%"},
            //     {"num": "60", "name": "SKU-06", "ratio": "6.00%"},
            //     {"num": "70", "name": "SKU-07", "ratio": "7.00%"},
            //     {"num": "20", "name": "SKU-02", "ratio": "2.00%"},
            //     {"num": "40", "name": "SKU-04", "ratio": "4.00%"},
            //     {"num": "120", "name": "SKU-12", "ratio": "12.00%"},
            //     {"num": "220", "name": "SKU-22", "ratio": "22.00%"},
            //     {"num": "80", "name": "SKU-08", "ratio": "8.00%"},
            //     {"num": "100", "name": "SKU-10", "ratio": "10.00%"},
            // ];
            // _data.data = aa;

            $("#" + _data.id).find('.reportListHeaderTitle').text(_data.title);
            if (_data.style === 1) {
                $("#" + _data.id).find('.reportView1Box').html('');
                $("#" + _data.id).find('.reportView1Box').html(showReportTemplate1(_data.data));
            } else if (_data.style === 2) {
                $("#" + _data.id).find('.reportView2Box').html('');
                $("#" + _data.id).find('.reportView2Box').html(showReportTemplate2(_data.data));
            } else if (_data.style === 3) {
                $("#" + _data.id).find('.reportView3Box').html('');
                $("#" + _data.id).find('.reportView3Box').html(showReportTemplate3(_data.data, document.getElementById(_data.id).querySelector('.reportView3Box')));
            } else if (_data.style === 4) {
                $("#" + _data.id).find('.reportView4Box').html('');
                $("#" + _data.id).find('.reportView4Box').html(showReportTemplate4(_data.data, document.getElementById(_data.id).querySelector('.reportView4Box')));
            } else if (_data.style === 5) {
                $("#" + _data.id).find('.reportView5Box').html('');
                $("#" + _data.id).find('.reportView5Box').html(showReportTemplate5(_data.data, document.getElementById(_data.id).querySelector('.reportView5Box')));
            } else if (_data.style === 6) {
                $("#" + _data.id).find('.reportView6Box').html('');
                $("#" + _data.id).find('.reportView6Box').html(showReportTemplate6(_data.data, document.getElementById(_data.id).querySelector('.reportView6Box')));
            } else if (_data.style === 7) {
                $("#" + _data.id).find('.reportView7Box').html('');
                $("#" + _data.id).find('.reportView7Box').html(showReportTemplate7(_data, document.getElementById(_data.id).querySelector('.reportView7Box')));
            }
        }

        // 图表模板一
        function showReportTemplate1(_data) {
            let html = "";
            if (!_data || _data.length === 0) {
                html += '<h3 style="text-align: center;line-height: 50px">暂无内容~</h3>'
            } else {
                let data = _data.slice(0, 15);
                data.forEach((item, index) => {
                    html += `
                        <div class="reportView1List">
                            <div class="reportView1ListOrder">${index + 1}</div>
                            <div class="reportView1ListCode">${item.name}</div>
                            <div class="reportView1ListTwig">
                                <p style="${index === 0 ? 'background-color: var(--color1)' : ''};width: ${item.ratio};"></p>
                            </div>
                            <div class="reportView1ListRatio">${item.ratio}</div>
                            <div class="reportView1ListQuantity">${item.num}</div>
                        </div>
                    `
                })
            }

            return html;
        }

        // 图表模板二
        function showReportTemplate2(_data) {
            let html = "";
            if (!_data || _data.length === 0) {
                html += '<h3 style="text-align: center;line-height: 50px">暂无内容~</h3>'
            } else {
                let data = _data.slice(0, 15);
                data.forEach((item, index) => {
                    html += `
                        <div class="reportView2List">
                            <div class="reportView2ListRanking"><span>${index < 3 ? '' : index + 1}</span></div>
                            <div class="reportView2ListCode">${item.name}</div>
                            <div class="reportView2ListRatio">${item.ratio}</div>
                            <div class="reportView2ListQuantity">${item.num}</div>
                        </div>
                    `
                })
            }
            return html;
        }

        // 图表模板三
        function showReportTemplate3(_data, ele) {
            $(ele).attr('_echarts_instance_', '');
            const chartDom = ele;
            const myChart = echarts.init(chartDom);
            let xAxisData = [], seriesData = [], option;
            let data = _data.slice(0, 20);
            data.forEach(item => {
                xAxisData.push(item.name);
                seriesData.push(item.num);
            });

            option = {
                color: ['#2CBB79'],
                tooltip: {
                    trigger: 'axis',
                    axisPointer: {
                        type: 'shadow'
                    }
                },
                grid: {
                    left: '0',
                    right: '0',
                    bottom: '30',
                    top: '20',
                    containLabel: true

                },
                xAxis: {
                    type: 'category',
                    data: xAxisData,
                    axisLabel: {
                        color: '#333333',
                        rotate: 20,
                        textStyle: {
                            fontSize: 12
                        },
                    },
                    axisLine: {
                        lineStyle: {
                            color: 'rgba(107,107,107,0.37)',
                        }
                    },
                    axisTick: {
                        show: false
                    },
                },
                yAxis: {
                    type: 'value',
                    axisLabel: {
                        color: '#333333',
                        textStyle: {
                            fontSize: 12
                        },
                    },
                    axisLine: {
                        lineStyle: {
                            color: 'rgba(107,107,107,0.37)',
                        }
                    },
                    axisTick: {
                        show: false
                    },
                    splitLine: {
                        lineStyle: {
                            type: 'dashed',
                        }
                    }
                },
                dataZoom: [{
                    show: true,
                    height: 20,
                    xAxisIndex: [0],
                    bottom: 0,
                    "start": 0,
                    "end": 60,
                    handleSize: '110%',
                    handleStyle: {color: "#009C5E"},
                    textStyle: {color: "#000"},
                    fillerColor: "rgb(0,181,89,0.3)",
                    borderColor: "rgb(0,181,89,0.3)",

                }],
                series: [
                    {
                        data: seriesData,
                        type: 'bar',
                        barWidth: '20px',
                        label: {
                            normal: {
                                show: true,
                                fontSize: 12,
                                fontWeight: '400',
                                color: '#333',
                                position: 'top',
                            }
                        }
                    }
                ]
            };
            option && myChart.setOption(option, true);
        }

        // 图表模板四
        function showReportTemplate4(_data, ele) {
            $(ele).attr('_echarts_instance_', '');
            const chartDom = ele;
            const myChart = echarts.init(chartDom);
            let legendData = [], option;
            let data = _data.slice(0, 5);
            data.forEach(item => {
                item.value = item.num;
                legendData.push(item.name);

            });

            let colorList = ['#009C5E', '#2CBB79', '#AAD976', '#FBC235', '#FAD865', '#00B559'];
            option = {

                tooltip: {
                    padding: 0,
                    backgroundColor: 'rgba(255,255,255,.7)',
                    boxShadow: '0px 3px 10px 0px rgba(0,0,0,0.1)',
                    borderRadius: '5',
                    color: '#333333',
                    width: '140',
                    formatter: function (parms) {
                        let str = "<div style='box-shadow:0 3px 10px 0 rgba(0,0,0,0.1);padding: 10px;min-width: 140px;background-color: #fff'>" +
                            parms.marker + "<span style='color:#009C5E'>" + parms.data.name + "</span></br></br>" +
                            "<div style='display: flex'><span style='color:#009C5E'>数值：</span><div style='flex: 1;text-align: right;color: #333333'>" + parms.data.value + "</div></div>" +
                            "<div style='display: flex'><span style='color:#009C5E'>占比：</span><div style='flex: 1;text-align: right;color: #333333'>" + parms.percent + "%</div></div></div>";
                        return str;
                    }
                },
                legend: {
                    icon: `path://M881.387 297.813c38.08 65.387 57.28 136.747 57.28 214.187s-19.094 148.8-57.28 214.187c-38.187 65.28-89.92 117.12-155.2 155.2S589.44 938.667 512 938.667s-148.8-19.094-214.187-57.28c-65.28-38.08-117.013-89.814-155.306-155.307C104.427 660.8 85.333 589.44 85.333 512c0-77.333 19.094-148.693 57.28-214.187 38.08-65.28 89.814-117.013 155.307-155.306C363.2 104.533 434.56 85.333 512 85.333c77.333 0 148.693 19.094 214.187 57.28 65.28 38.187 117.013 89.92 155.2 155.2z m-217.707-47.36C617.387 223.467 566.827 209.92 512 209.92s-105.387 13.547-151.68 40.533-82.987 63.68-109.973 109.974c-26.987 46.293-40.534 96.853-40.534 151.68s13.547 105.386 40.534 151.68c26.986 46.293 63.68 82.986 109.973 109.973 46.293 26.987 96.853 40.533 151.68 40.533s105.387-13.546 151.68-40.533c46.293-26.987 82.987-63.68 109.973-109.973 26.987-46.294 40.534-96.854 40.534-151.68s-13.547-105.387-40.534-151.68c-27.093-46.294-63.786-82.987-109.973-109.974z`,
                    orient: 'vertical',
                    right: '20px',
                    align: 'auto',
                    top: 'middle',
                    itemWidth: 14,
                    itemHeight: 14,
                    formatter: function (params) {
                        let num = "", ratio = "";
                        data.forEach(item => {
                            if (item.name == params) {
                                num = item.num;
                                ratio = item.ratio;
                            }

                        });
                        return [`{name|${params}}`, `{value|${num}}   {ratio|${ratio}}`].join('\n');
                    },
                    textStyle: {
                        rich: {
                            name: {
                                width: 100,
                                overflow: 'hidden',
                                fontSize: 16,
                                lineHeight: 20,
                                color: '#333333',
                                marginBottom: 15,
                            },
                            value: {
                                fontSize: 14,
                                overflow: 'hidden',
                                lineHeight: 18,
                                color: '#666666',

                            },
                            ratio: {
                                fontSize: 14,
                                overflow: 'hidden',
                                lineHeight: 18,
                                color: '#666666',
                            }
                        }

                    },
                    data: legendData
                },
                series: [{
                    type: 'pie',
                    center: ['30%', '50%'],
                    radius: ['40%', '75%'],
                    hoverOffset: 15,
                    label: {
                        normal: {
                            show: false
                        }
                    },
                    itemStyle: {
                        normal: {
                            color: function (params) {
                                return colorList[params.dataIndex]
                            }
                        }
                    },
                    data: data
                }]
            };
            option && myChart.setOption(option);
        }

        // 图表模板五
        function showReportTemplate5(_data, ele) {
            $(ele).attr('_echarts_instance_', '');
            const chartDom = ele;
            const myChart = echarts.init(chartDom);
            let yAxisData = [], seriesData = [], option;
            _data = _data.reverse();
            let data = _data.slice(0, 10);
            data.forEach(item => {
                yAxisData.push(item.name);
                seriesData.push(item.num);
            });

            option = {
                tooltip: {
                    trigger: 'axis',
                    show: true,
                    axisPointer: { // 坐标轴指示器，坐标轴触发有效
                        type: 'line' // 默认为直线，可选为：'line' | 'shadow'
                    },
                },
                grid: {
                    left: '0',
                    right: '10%',
                    bottom: '0',
                    top: '0',
                    containLabel: true
                },
                xAxis: [{
                    splitLine: {
                        show: false
                    },
                    type: 'value',
                    show: true,
                    axisTick: {show: false},
                    axisLine: {
                        lineStyle: {
                            color: 'rgba(107,107,107,0.37)',
                        }
                    },
                }],
                yAxis: [{
                    splitLine: {
                        show: false
                    },
                    axisLine: {
                        show: false
                    },
                    type: 'category',
                    axisTick: {
                        show: false
                    },
                    data: yAxisData,
                    axisLabel: {}
                }],
                series: [{
                    type: 'bar',
                    color: '#2CBB79',
                    barWidth: 18, // 柱子宽度
                    label: {
                        show: true,
                        position: 'right', // 位置
                        color: '#333333',
                        fontSize: 14,
                        fontWeight: 'bold', // 加粗
                        distance: 5 // 距离
                    }, // 柱子上方的数值

                    data: seriesData,
                },]
            };

            option && myChart.setOption(option, true);
        }

        // 图表模板六
        function showReportTemplate6(_data, ele) {
            $(ele).attr('_echarts_instance_', '');
            const chartDom = ele;
            const myChart = echarts.init(chartDom);
            let xAxisData = [], option;
            let data = _data.slice(0, 20);
            data.forEach(item => {
                xAxisData.push(item.name);
                item.value = item.num;
            });
            option = {
                tooltip: {
                    trigger: "axis",
                    borderRadius: '5',
                    padding: 0,
                    backgroundColor: 'rgba(255,255,255,.7)',
                    color: '#333333',
                    formatter: function (parms) {
                        let str = "<div style='min-width: 140px;background-color: #fff;box-shadow: 0px 3px 10px 0px rgba(0,0,0,0.1);padding: 10px'>" +
                            parms[0].marker + "<span style='color:#009C5E'>" + parms[0].data.name + "</span></br></br>" +
                            "<div style='display: flex'><span style='color:#009C5E'>数值：</span><div style='flex: 1;text-align: right;color: #333333'>" + parms[0].data.value + "</div></div>" +
                            "<div style='display: flex'><span style='color:#009C5E'>占比：</span><div style='flex: 1;text-align: right;color: #333333'>" + parms[0].data.ratio + "</div></div></div>";
                        return str;
                    }
                },
                grid: {
                    top: '10',//上边距
                    right: '5',//右边距
                    left: '5',//左边距
                    bottom: '10%',//下边距
                    containLabel: true,
                },
                xAxis: {
                    type: 'category',
                    data: xAxisData,
                    axisTick: {
                        show: false //隐藏X轴刻度
                    },
                    axisLine: {
                        lineStyle: {
                            color: "#CCCCCC"
                        }
                    },
                },
                yAxis: [{
                    type: 'value',
                    axisLabel: {
                        color: 'rgba(0,0,0,0.65)',
                        textStyle: {
                            fontSize: 14
                        },
                    },
                    axisLine: {
                        show: false,
                        lineStyle: {
                            color: 'rgba(223, 223, 223, 1)',
                        }
                    },
                    axisTick: {
                        show: false
                    },
                    splitLine: {
                        lineStyle: {
                            color: 'rgba(223, 223, 223, 1)',
                            type: "dashed",
                        }
                    }
                }],
                series: [{
                    type: 'line',
                    data: data,
                    symbolSize: 10, //标记的大小
                    lineStyle: {
                        color: "#009C5E",
                        width: 4,
                    },
                    itemStyle: {
                        //折线拐点标志的样式
                        color: "#009C5E",
                        borderWidth: 5,
                    },
                    smooth: 0.4,
                    areaStyle: {
                        normal: {
                            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                offset: 0,
                                color: 'rgba(0, 156, 94,0.1)'
                            },
                                {
                                    offset: 1,
                                    color: 'rgba(0, 156, 94,0)'
                                }
                            ], false),
                            shadowColor: 'rgba(0, 156, 94, 0.9)',
                            shadowBlur: 20
                        }
                    },
                }],
                dataZoom: [{
                    show: true,
                    height: 30,
                    xAxisIndex: [0],
                    bottom: 0,
                    "start": 0,
                    "end": 60,
                    handleSize: '110%',
                    handleStyle: {color: "#009C5E"},
                    textStyle: {color: "#000"},
                    fillerColor: "rgb(0,181,89,0.3)",
                    borderColor: "rgb(0,181,89,0.3)",

                }],
            };
            option && myChart.setOption(option, true);
        }

        // 图表模板七
        function showReportTemplate7(_data, ele) {
            $(ele).attr('_echarts_instance_', '');
            const chartDom = ele;
            const myChart = echarts.init(chartDom);
            let xAxisData = [], seriesData = [], option;
            let colorList = ['#009C5E', '#2CBB79', '#AAD976', '#FBC235', '#FAD865', '#00B559'];
            let data = _data.data.slice(0, 5);
            data.forEach(item => {
                item.value = item.num;
                xAxisData.push(item.name);
                seriesData.push(item);
            });
            option = {
                color: colorList,
                tooltip: {
                    show: true
                },
                title: [
                    {
                        text: '总数量',
                        left: '23%',
                        top: '42%',
                        textStyle: {
                            color: '#333',
                            fontSize: 16,
                            fontWeight: '100',
                        },
                    },
                    {
                        text: _data.sum.num,
                        left: '22%',
                        top: '50%',
                        textStyle: {
                            fontSize: 32,
                            color: '#333',
                            fontWeight: 'bold',
                        },
                    },
                ],
                legend: {
                    orient: 'vertical',
                    left: '70%',
                    top: 'center',
                    align: 'left',
                    itemWidth: 6,
                    itemHeight: 20,
                    itemStyle: {
                        borderRadius: '30',
                    },
                    textStyle: {
                        color: "#333"
                    },
                    itemGap: 20,
                    formatter: function (params) {
                        let num = "", ratio = "";
                        seriesData.forEach(item => {
                            if (item.name == params) {
                                num = item.num;
                                ratio = item.ratio;
                            }

                        });
                        return [`{name|${params}}`, `{value|${num}}   {ratio|${ratio}}`].join('\n');
                    },
                    textStyle: {
                        rich: {
                            name: {
                                width: 100,
                                overflow: 'hidden',
                                fontSize: 16,
                                lineHeight: 20,
                                color: '#333333',
                                marginBottom: 15,
                                paddingTop: 10,
                            },
                            value: {
                                fontSize: 14,
                                overflow: 'hidden',
                                lineHeight: 18,
                                color: '#666666',

                            },
                            ratio: {
                                fontSize: 14,
                                overflow: 'hidden',
                                lineHeight: 18,
                                color: '#666666',
                            },
                        }

                    },
                },
                series: [
                    {
                        type: "pie",
                        center: ['28%', '50%'],
                        radius: ["50%", "60%"],
                        itemStyle: {
                            normal: {
                                borderWidth: 8,
                                borderColor: "#fff"
                            }
                        },
                        label: {
                            show: false
                        },
                        data: seriesData,
                    }
                ]
            };
            option && myChart.setOption(option, true);
        }

        // table表格
        function showTable(_obj) {
            $('#weighCabinetReportTableTitle').text(_obj.tableTitle);
            $('#weighCabinetReportTableMore').attr('href', _obj.tableObj.moreUrl);
            table.render({
                elem: '#weighCabinetReportTable',
                url: config.base + _obj.tableObj.url,
                where: _obj.reportObj,
                page: true,
                cellMinWidth: 100,
                cols: [_obj.tableObj.cols],
                done: function (res, curr, count) {

                }
            });

            // 工具条点击事件
            table.on('tool(processInfoTable)', function (obj) {
                let data = obj.data;
                if (obj.event === 'edit') { //修改
                    // showEditModel(data);
                }
            });

        }

        //图表内容区域所有下拉框操作
        form.on('select', function (data) {
            // if ($(data.elem).attr("lay-filter") == 'timeType') return false;

            if ($(data.elem).parents("#weighCabinetReport").attr('id') != 'weighCabinetReport') return false;
            if (data.value) {
                let thisValue = data.value, thisName = $(data.elem).attr('name'),
                    thisId = $(data.elem).closest('.reportList').attr('id');

                activeConfigData.reportSubObj.forEach((item, index) => {
                    if (item.id === thisId) {
                        item.selectParam[thisName] = thisValue;
                    }
                });
                getReportDataOne(thisId)
            }
        });

        //刷新单个数据图表数据
        function getReportDataOne(_id) {
            let thisObj = {}, thisIndex = "";
            activeConfigData.reportSubObj.forEach(((item, index) => {
                if (item.id == _id) {
                    thisIndex = index;
                }
            }));

            if (activeConfigData.reportSubObj[thisIndex].selectParam) {
                thisObj = Object.assign({}, activeConfigData.reportSubObj[thisIndex].selectParam, activeConfigData.reportObj);
            } else {
                thisObj = Object.assign({}, activeConfigData.reportObj);
            }
            admin.req(activeConfigData.reportSubObj[thisIndex].url, thisObj, res => {
                if (res.code === 200) {
                    activeConfigData.reportSubObj[thisIndex].data = res.data.data.list;
                    activeConfigData.reportSubObj[thisIndex].title = res.data.data.title;
                    showReportData(activeConfigData.reportSubObj[thisIndex])
                }
            }, 'GET');
        }

        //单位
        function priceUnit(num) {
            let unit = ['', '万', '亿', '万亿'];
            let k = 10000, i;
            if (num < k) {
                return num
            } else {
                i = Math.floor(Math.log(num) / Math.log(k));
                return (num / Math.pow(k, i)).toFixed(2) + unit[i]
            }
        }

        // 图表更多点击事件
        $('.reportListHeaderMore').click(function () {

            let indexData = activeConfigData.reportSubObj[$('.reportBox').eq($(this).parents('.reportBox').index()).find('.reportListHeaderMore').index(this)];
            showAllDataChart(indexData)
        });

        // 更多弹窗
        function showAllDataChart(_data) {
            admin.open({
                type: 1,
                area: ['1400px', '700px'],
                offset: '65px',
                title: _data.title,
                content: $('#allDataChart').html(),
                success: function () {
                    let allDataChartFormchartDom = echarts.init(document.getElementById('allDataChartFormchartDom'));
                    let option1, nameData = [], valueData = [], ratioData = [], dataZoomShow = [];
                    let colsData = [
                        {field: 'name', title: '名称'}
                        , {field: 'num', title: '值'}
                        , {field: 'ratio', title: '占比'}
                    ];
                    let reference = 0;
                    if (_data.data.length > 0) {
                        $('#allDataChartFormchartDom').show();
                        $('#allDataChartTableBox').hide();
                        $('#referenceBox').show();
                        colsData = [
                            {field: 'name', title: 'name'}
                            , {field: 'value', title: 'value'}
                            , {field: 'ratio', title: 'ratio'}
                        ];
                    }

                    if (_data.data.length > 15) {
                        dataZoomShow = [
                            {
                                type: 'slider',
                                show: true,
                                yAxisIndex: 0,
                                startValue: 1,                           //数据窗口范围的起始数值
                                endValue: 15,
                                width: 16,
                                showDetail: false,
                                fillerColor: '#009C5E',
                                handleSize: 0,
                                showDataShadow: false,
                            },
                            {
                                type: 'inside',
                                yAxisIndex: [0],
                                start: _data.length - 10,
                                end: _data.length,
                                zoomOnMouseWheel: false,
                                moveOnMouseWheel: false
                            }
                        ];
                    } else {
                        dataZoomShow = '';
                    }

                    for (let i = 0; i < _data.data.length; i++) {
                        nameData.push(_data.data[i].name);
                        valueData.push(_data.data[i].num);
                        ratioData.push(_data.data[i].ratio);
                    }

                    ratioData = ratioData.reverse();

                    option1 = {
                        color: '#009C5E',
                        title: {
                            text: _data.title
                        },
                        legend: {
                            left: '300px',
                            itemHeight: 12,
                            itemGap: 30,
                            textStyle: {
                                fontSize: 12,
                                color: '#62BD4C',
                                fontStyle: "normal",
                                fontFamily: 'PingFang SC',
                            },
                            data: [{name: '平均值', icon: 'line'}, {name: '参考值', icon: 'line'}],

                        },
                        tooltip: {},
                        xAxis: {
                            type: 'value',
                            axisLine: {
                                show: true,
                                lineStyle: {
                                    type: "dashed"
                                }
                            },
                            splitLine: {
                                show: true,
                                lineStyle: {
                                    type: 'dashed',
                                    color: '#CCCCCC ',
                                }
                            },
                            axisTick: {
                                show: false
                            }
                        },
                        yAxis: {
                            data: nameData.reverse(),
                            axisTick: {
                                show: false
                            },
                            axisLine: {
                                show: true,
                                lineStyle: {
                                    type: "dashed"
                                }
                            },
                        },
                        dataZoom: dataZoomShow,
                        series: [{
                            type: 'bar',
                            barWidth: '20px',
                            barCategoryGap: '10px',
                            data: valueData.reverse(),
                            label: {
                                show: true,
                                position: 'right',
                                formatter: function (params) {
                                    return valueData[params.dataIndex] + "(" + ratioData[params.dataIndex] + ")"
                                },
                            }
                        },
                            _data.avg ? {
                                name: '平均值',
                                type: 'line',
                                color: '#62BD4C',
                                itemStyle: {
                                    normal: {
                                        color: '#62BD4C',
                                        type: 'dotted'
                                    },
                                },
                                markLine: {
                                    symbol: "none",
                                    data: [
                                        {
                                            name: '平均值',
                                            xAxis: _data.avg
                                        },
                                    ]
                                }
                            } : '',
                            reference > 0 ? {
                                name: '参考值',
                                type: 'line',
                                color: '#007BFF',
                                itemStyle: {
                                    normal: {
                                        color: '#007BFF',
                                        type: 'dotted'
                                    },
                                },
                                markLine: {
                                    symbol: "none",
                                    data: [
                                        {
                                            name: '参考值',
                                            xAxis: reference
                                        },
                                    ]
                                }
                            } : ''
                        ]
                    };
                    option1 && allDataChartFormchartDom.setOption(option1);

                    let outData = [..._data.data];
                    let allDataChartTableTb = table.render({
                        elem: '#allDataChartTable',
                        data: outData,
                        cellMinWidth: 100,
                        height: 450,
                        page: false,
                        limit: Number.MAX_VALUE,
                        cols: [colsData],

                    });

                    $('#allDataChartFormExport').click(function () {
                        table.exportFile(allDataChartTableTb.config.id, outData, 'xls');
                    });
                }
            });

        }

        // 统计点击事件
        $('#statBoxItem').delegate('.statBoxItemList', 'click', function (data) {
            showMonthlyStatistics($(this).find('.statBoxItemListName').text(), 'enterprisecab/bill/admin/weighCabinetReport/headResult', $(this).attr('sign'), $(this).index());
        });

        //统计弹窗
        function showMonthlyStatistics(_title, _url, _colsType, _click) {
            let url = config.base + _url;
            let where = JSON.parse(JSON.stringify(activeConfigData.headerObj));
            where.click = _click + 1;
            let exportData = '';
            let colsData = [
                {type: 'numbers', title: '序号'}
                , {field: 'code', title: '编码'}
                , {field: 'cabCode', title: '柜子编码'}
                , {field: 'marketPrice', title: '价格'}
                , {field: 'oldSpecCode', title: '旧规格码'}
                , {field: 'skuCode', title: '物料编号'}
                , {field: 'spaceCode', title: '货道编码'}
                , {field: 'quantity', title: '数量'}
                , {field: 'weight', title: '重量', templet: d => d.weight + "(" + d.weightUnitDesc + ")"}
                , {field: 'creatorName', title: '操作人'}
                , {field: 'createTime', title: '时间'}
            ];
            if (_colsType == 2) {
                colsData = [
                    {type: 'numbers', title: '序号'}
                    , {field: 'code', title: '编码'}
                    , {field: 'cabCode', title: '柜子编码'}
                    , {field: 'marketPrice', title: '价格'}
                    , {field: 'oldSpecCode', title: '旧规格码'}
                    , {field: 'skuCode', title: '物料编号'}
                    , {field: 'spaceCode', title: '货道编码'}
                    , {field: 'quantity', title: '数量'}
                    , {
                        field: 'weightPreAndChecked', sort: true, title: '盘验前/后重量', templet: function (d) {
                            return d.weight + '/' + d.weightChecked + '(' + d.weightUnitDesc + ')';
                        }
                    }
                    , {
                        field: 'quantityPreAndChecked', title: '盘验前/后数量', templet: function (d) {
                            return d.quantity + '/' + d.quantityChecked + '(' + d.quantityUnitDesc + ')';
                        }
                    }
                    , {
                        field: 'businessType', title: '存储性质', templet: function (d) {
                            if (d.businessType == 'normal') {
                                return '可用';
                            } else if (d.businessType == 'repair') {
                                return '报修'
                            } else if (d.businessType == 'recycle') {
                                return '报废'
                            }
                        }
                    }
                    , {
                        field: 'remark', sort: true, title: '盘验结果', templet: function (d) {
                            if (d.remark) {
                                if (d.remark.substring(d.remark.length - 1, d.remark.length) == ';') {
                                    return d.remark.substring(0, d.remark.length - 1)
                                }
                                return d.remark;
                            } else {
                                return '';
                            }
                        }
                    }
                    , {field: 'creatorName', title: '操作人'}
                    , {field: 'createTime', title: '时间'}
                ];
            } else if (_colsType == 3) {
                colsData = [
                    {type: 'numbers', title: '序号'}
                    , {field: 'code', title: '编码'}
                    , {field: 'cabCode', title: '柜子编码'}
                    , {field: 'marketPrice', title: '价格'}
                    , {field: 'oldSpecCode', title: '旧规格码'}
                    , {field: 'skuCode', title: '物料编号'}
                    , {field: 'spaceCode', title: '货道编码'}
                    , {field: 'quantity', title: '数量'}
                    , {field: 'weight', title: '重量', templet: d => d.weight + "(" + d.weightUnitDesc + ")"}
                    , {field: 'createTime', title: '时间'}
                ];
            }

            admin.open({
                type: 1,
                area: ['1400px', '800px'],
                offset: '65px',
                title: _title,
                content: $('#monthlyStatisticsForm').html(),
                success: function () {
                    let monthlyStatisticsFormTb = table.render({
                        elem: '#monthlyStatisticsFormTable',
                        url: url,
                        where: where,
                        cellMinWidth: 90,
                        height: 600,
                        page: false,
                        cols: [colsData],
                        done: function (res, curr, count) {
                            exportData = res.data;
                        }
                    });

                    $('#monthlyStatisticsFormExport').click(function (data) {
                        table.exportFile(monthlyStatisticsFormTb.config.id, exportData, 'xls');
                    });

                }


            });
        }


    });
</script>
